package ValueOf;

public class IntegerTest {
    public static void main(String[] args) {
        Integer i1 = Integer.valueOf(15);
        System.out.println(i1);

//        Integer i2 = Integer.valueOf("abc"); // NumberFormatException
//        Integer i2 = Integer.valueOf("20011001", 2); // aNumberFormatException
        Integer i2 = Integer.valueOf("10011001", 2);
        System.out.println(i2);

        Integer i8 = Integer.valueOf("752", 8);
        System.out.println(i8);

        Integer i16 = Integer.valueOf("F1AB6E", 16);
        System.out.println(i16);

        Integer i_default = Integer.valueOf("2314654");
        System.out.println(i_default);

    }
}
